qrisp.QuantumCircuit.depth#
- QuantumCircuit.depth(depth_indicator=<function QuantumCircuit.<lambda>>, transpile=True)[source]#
Returns the depth of the QuantumCircuit. Note that the depth on QuantumCircuit which are not transpiled, might have very little correlation with the runtime.
- Parameters:
- depth_indicatorfunction, optional
A function which receives an Operation instance and returns the time/logical depth this operation takes. By default every Operation takes logical depth 1.
- transpilebool, optional
Boolean to indicate wether the QuantumCircuit should be transpiled before the depth is calculated. The default is True.
- Returns:
- integer
The depth of the QuantumCircuit.